{% extends "PopshouseAdminBundle::layout.html.twig" %}

{% block js %}
admin('entry','inline','{{ path('admin_news_delete_dummy') }}');
{% endblock %}

{% block title %}
Nieuws & Promotionele berichten
{% endblock %}
{% block content %}
<div class="left side">
    {% include "PopshouseAdminBundle:News:menu.html.twig"  %}
</div>
<div class="left content" style="width:670px">

     <h2>Nieuws</h2>
     {% if app.session.hasFlash('notice') %}
        <div class="message message-green">
            {{ app.session.flash('notice') }}
            <span class="close"><img src="{{ asset('images/layout/admin/icon/close_green.png') }}" alt="sluit" /></span>
        </div>
    {% endif %}
      <p><a href="{{ path('admin_news_new') }}" class="action"><span>+ Nieuws toevoegen</span></a></p>
     
    <div>
    <ol class="nieuws entrys">
    {% for entry in news %}
    <li id="entry_{{ entry.id }}" style="background-color: {{ cycle(['#e4edf5', '#fff'], loop.index) }};">
   
      <a href="{{ path('admin_news_edit',{'id':entry.id}) }}"><img src="{{ asset('images/photo/news/'~entry.id~'t.jpg') }}" />
  {{ ("title."~entry.id) | trans({},"images") | raw }}</a>
    <div id="tools" style="display:none;">
       <a class="noborder" id="delete" entryid="{{ entry.id }}" href="{{ path('admin_news_delete',{'id':entry.id}) }}"><img src="{{ asset('images/layout/icons/delete.png') }}" class="clickable" /></a>
    </div>
         <div id="dialog_{{ entry.id }}" style="display:none;" title="Bevestig verwijderen?">

            Weet je zeker dat je bericht "{{ ("title."~entry.id) | trans({},"images") | raw }}" wil verwijderen?

        </div>
    </li>
    {% endfor %}
    </ol>
    </div>
</div>
{% endblock %}